<?php

use Illuminate\Database\Seeder;
use  App\Models\Admin;
class AdminSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //清空数据库
        Admin::truncate();
        //添加模拟数据
        factory(Admin::class,109)->create();
        //规定id为1的用户名为admin
        Admin::where('id',1)->update(['username'=>'admin']);

    }
}
